<include file="../Public/header" />
<script data-main="__PUBLIC__/admin/js/page/cms/template/sitetemplatelist" src="__PUBLIC__/admin/js/lib/requirejs/require.js"></script>
</head>

<body>
  <div class="page">
    <div class="page-hd">
      <h1>模版管理</h1>
    </div>
    <div class="filterbar">
      <label for="">站点列表：
        <select name="sitelist" id="J_sitelists">
          <option value="0">请选择</option>
          <volist name="sitelist" id="slist">
            <option value="{$slist['siteid']}" <eq name="slist.siteid" value="$ssid">selected</eq>>{$slist['name']}</option>
          </volist>
        </select>
      </label>
    </div>
    <hr>
    <input type="hidden" id="J_hideSid" value="{$ssid}" />
    <div class="datas">
      <div class="datas-bd">
        <table class="table">
          <thead>
            <tr>
              <th style="width:14px">
                <input type="checkbox" class="toggle-all">
              </th>
              <th style="">模版ID</th>
              <th style="">模版类型</th>
              <th style="">模版名称</th>
              <th style="">操作</th>
            </tr>
          </thead>
          <tbody>
            <volist name="list" id="list">
              <tr data-id="{$list['id']}">
                <td>
                  <input type="checkbox" name="checkbox" class="toggle" />
                </td>
                <td>{$list.id}</td>
                <td>
                  <eq name="list.template_type" value="channels">栏目模版</eq>
                  <eq name="list.template_type" value="contents">内容模版</eq>
                  <eq name="list.template_type" value="home">首页模版</eq>
                  <eq name="list.template_type" value="public">公用模版</eq>
                  <eq name="list.template_type" value="search">搜索模版</eq>
                </td>
                <td>{$list.template_name}</td>
                <td><a href="javascript:;" onclick="javascript:window.location.href='{:URL('cms/Template/edittpl',array('id'=>$list['id'],'sid'=>$ssid))}'">修改</a> |
                  <a href="javascript:;" class="A_del">删除</a>
                </td>
              </tr>
            </volist>
          </tbody>
        </table>
      </div>
      <div class="datas-ft" style="display: none;">
        <div class="actions">
          <a href="{:URL('cms/Template/addtpl',array('sid'=>$ssid))}" class="btn">添加模版</a>
          <a href="javascript:;" class="btn" id="J_del">批量删除</a>
        </div>
      </div>
    </div>
  </div>
</body>

</html>
